from sklearn.svm import SVC             # SVM 支持向量机
from sklearn.model_selection import train_test_split    # 数据集划分
from sklearn.datasets import make_classification   # 生成分类数据集



X, y  = make_classification(n_samples=100, n_features=20, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3)

svm = SVC(kernel='rbf') # 使用 RBF 核函数
svm.fit(X_train, y_train) 

predictions = svm.predict(X_test) 

print("Predictions:", predictions)   
